package org.jeecg.modules.demo.evaluate.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.evaluate.entity.Evaluate;
import org.jeecg.modules.demo.evaluate.entity.TraderE;

import java.util.List;

@Mapper
public interface EvaluateMapper extends BaseMapper<Evaluate> {

    @Select("select * from GC_EVALUATE where traderid=#{traderid}")
    Evaluate getByTraderid(Integer traderid);

    @Select("select * from TRADER")
    List<TraderE> getTraderElist(Page<TraderE> page, QueryWrapper<TraderE> queryWrapper);

    @Select("select TOTALSCORE from GC_EVALUATE where TRADERID = #{traderid}")
    String getTotalscoreBytraderid(Integer traderid);
}
